package cn.schoolwow.util.module.check.jsonarray.handler;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.listener.TryCatchFinallyHandler;
import cn.schoolwow.util.module.check.common.flow.CheckMessageNotEmptyFlow;
import cn.schoolwow.util.module.check.jsonarray.flow.common.CheckJSONArrayNotEmptyCommonFlow;

public class CheckJSONArrayTryCatchFinallyHandler implements TryCatchFinallyHandler {
    @Override
    public void handleTryStart(FlowContext flowContext) throws Exception {
        flowContext.startFlow(new CheckMessageNotEmptyFlow())
                .next(new CheckJSONArrayNotEmptyCommonFlow())
                .execute();
    }

    @Override
    public void handleTryEnd(FlowContext flowContext) throws Exception {

    }

    @Override
    public void handleException(FlowContext flowContext, Exception e) {

    }

    @Override
    public void handleFinally(FlowContext flowContext) {

    }

    @Override
    public String name() {
        return "实例检查处理器";
    }
}
